﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Windows.Forms;
using System.Deployment.Application;

namespace SMS
{
    public class KhachHang
    {
        
        string makh;
        string HoTen;
        string GioiTinh;
        string DiaChi;
        int NgaySinh;
        int NamSinh;
        int ThangSinh;
        string DTDD;
        string DTNha;
        string TinhThanhPho;
        string QuanHuyen;
        string NgheNghiep;
        string CMND;
        string TinhTrang;
       // string MaXeDaMua;
       // string NgayMua;

        fLogin main;
        public KhachHang(fLogin main1)
        {
            main = main1;
        }

         public string Makh
         {
             get { return makh; }
             set { makh = value; }
         }
         public string Hoten
         {
             get { return HoTen; }
             set { HoTen = value; }
         }
         public string Gioitinh
         {
             get { return GioiTinh; }
             set { GioiTinh = value; }
         }
         public string Diachi
         {
             get { return DiaChi; }
             set { DiaChi = value; }
         }
         public int Ngaysinh
         {
             get { return NgaySinh; }
             set { NgaySinh = value; }
         }
         public int Namsinh
         {
             get { return NamSinh; }
             set { NamSinh = value; }
         }
         public int Thangsinh
         {
             get { return ThangSinh; }
             set { ThangSinh = value; }
         }
         public string DTdidong
         {
             get { return DTDD; }
             set { DTDD = value; }
         }
         public string DTnha
         {
             get { return DTNha; }
             set { DTNha = value; }
         }
         public string TinhTP
         {
             get { return TinhThanhPho; }
             set { TinhThanhPho = value; }
         }
         public string Quanhuyen
         {
             get { return QuanHuyen; }
             set { QuanHuyen = value; }
         }
         public string Nghenghiep
         {
             get { return NgheNghiep; }
             set { NgheNghiep = value; }
         }
         public string CM
         {
             get { return CMND; }
             set { CMND = value; }
         }
         public string Tinhtrang
         {
             get { return TinhTrang; }
             set { TinhTrang = value; }
         }
        SqlConnection conn;
        SqlCommand command;
        SqlDataReader reader;
         public void loadcombobox(ComboBox cb, string strselect, byte chiso)
         {
             SqlConnection conn = new SqlConnection(main.ConnectDB);
             conn.Open();

             command = new SqlCommand(strselect, conn);
             reader = command.ExecuteReader();
             while (reader.Read())
             {
                 cb.Items.Add(reader[chiso].ToString());
             }
             conn.Close();
         }
       


    }
}
